<?php

// uncomment the following to define a path alias
// Yii::setPathOfAlias('local','path/to/local-folder');
Yii::setPathOfAlias('bootstrap', dirname(__FILE__).'/../extensions/bootstrap');

// This is the main Web application configuration. Any writable
// CWebApplication properties can be configured here.
return array(
	'basePath'=>dirname(__FILE__).DIRECTORY_SEPARATOR.'..',
	'name'=>'Aplicaciones varias',
	'language'=>'es',
//	'timezone' => 'UTC',
	// preloading 'log' component
	'preload'=>array('log'),
    'aliases' => array(
        // yiiwheels configuration
        'yiiwheels' => realpath(__DIR__ . '/../extensions/yiiwheels'), // change if necessary
    ),

	// autoloading model and component classes
	'import'=>array(
		'application.models.*',
		'application.components.*',
		'ext.giix-components.*',
		'ext.select2.Select2',
		'application.controllers.*',
	),
	
	'behaviors'=>array('ApplicationConfigBehavior'),

	'modules'=>array(
		'gii'=>array(
			'class'=>'system.gii.GiiModule',
			'password'=>'xxx',
			// If removed, Gii defaults to localhost only. Edit carefully to taste.
			'ipFilters'=>array('127.0.0.1', $_SERVER['REMOTE_ADDR'],'::1'),
			'generatorPaths'=>array(
				'ext.giix-core',
				'bootstrap.gii',
			),
		),
		'rbam'=> array(
			'development'=>true,
			'initialise'=>true
		),
		'legales'=>array(),
		'CallCenter'=>array(),
		'ticket'=>array(),
		'wservices',
		'reaseguro',
	),

	// application components
	'components'=>array(
		'user'=>array(
			// enable cookie-based authentication
			'allowAutoLogin'=>true,
		),
		'authManager'=>array(
       		'class'=>'MyAuthManager',
       		'connectionID'=>'db',
		),
		'Smtpmail'=>array(
            'class'=>'application.extensions.smtpmail.PHPMailer',
            'Host'=>"mail.horizonte.com.ar",
            'Username'=>'gestionreclamos@horizonte.com.ar',
            'Password'=>'xxx',
            'Mailer'=>'smtp',
            'Port'=>25,
            'SMTPAuth'=>true, 
        ),		
		'bootstrap'=>array(
            'class'=>'bootstrap.components.Bootstrap',
        ),
                // yiiwheels configuration
        'yiiwheels' => array(
            'class' => 'yiiwheels.YiiWheels',
        ),
        'widgetFactory'=>array(
            'widgets'=>array('CJuiDatePicker'=>array(
        		'language'=>'es',
        		'options'=>'dd-mm-yy',        
        ),
        )),
		// uncomment the following to enable URLs in path-format
		/*
		'urlManager'=>array(
			'urlFormat'=>'path',
			'rules'=>array(
				'<controller:\w+>/<id:\d+>'=>'<controller>/view',
				'<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',
				'<controller:\w+>/<action:\w+>'=>'<controller>/<action>',
			),
		),
		*/
		// uncomment the following to use a MySQL database
		/*
		
		'db'=>array(
			'connectionString' => 'sqlite:'.dirname(__FILE__).'/../data/testdrive.db',
		),
		*/
		'db'=>array(
			'connectionString' => 'pgsql:host=192.9.200.48;port=5432;dbname=DesaHorizMig',
			'emulatePrepare' => true,
			'username' => 'horiz',
			'password' => 'xxx',
			'charset' => 'utf8',
			'tablePrefix' => 'tbl_',
			'enableProfiling'=>false,
        	'enableParamLogging'=>false,        	
		),
		
		'errorHandler'=>array(
			// use 'site/error' action to display errors
			'errorAction'=>'site/error',
		),
		'log'=>array(
			'class'=>'CLogRouter',
			'routes'=>array(
				array(
					'class'=>'CFileLogRoute',
					'levels'=>'error, warning, info',
				),
				  array(
            	  'class'=>'CFileLogRoute',
            	  'logFile'=>'prof.log',
          		  'categories'=>'system,vardump,application',
        		),
				// uncomment the following to show log messages on web pages
				/*
				array(
					'class'=>'CWebLogRoute',
				),
				*/
			),
		),
	),

	// application-level parameters that can be accessed
	// using Yii::app()->params['paramName']
	'params'=>array(
		// this is used in contact page
		'adminEmail'=>'webmaster@example.com',
	),
	
);
